Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emanifest backend logic separation and Floating Acion Buttons #663

Merged
merged 12 commits into from
Dec 11, 2023

Conversation

dpgraham4401
Copy link
Member

@dpgraham4401 dpgraham4401 commented Dec 11, 2023

Description

This PR separates our backend business logic that deals with interacting with e-Manifest from our back end business logic that deals with our manifest model.

I also went a little overboard and also added two new features to the UI.

  1. a Floating action button
    • a reusable floating action button that follows the Material Design principles and...
    • a new component in the manifest form (that uses the reusable button) that prompts a user to Sign, Edit, or Save depending on the user's permissions and the manifest status.
  2. A pill that shows the status of searching for sites through RCRAInfo's web services. It also displays a small warning if the user's organization admin has not set up their RCRAInfo API ID and Keys.

In addition, the HandlerSearchForm now displays both RCRA sites that haztrak has stored in it's database (which are usually retrieved quickly and are, of course, only dependent on our service) and sites retrieved from RCRAInfo (often additional latency associated with the additional service call and may be unavailable).

Issue ticket number and link

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

… used to encapsulate intereactions with e-Manifest (the RCRAInfo module)

we're extracting the e-Manifest parts of the manifest service to help keep the separation of responsiblities clear
…ifest to RCRAInfo or just saving a manifest to haztrak
…hing async thunks or custom hook API calls. In effect, we are centralizing our API layer into the redux store
…utput selectors that returned input values. The warning stated that likely would result in memoization errors.

See the redux documentation https://redux.js.org/usage/deriving-data-selectors\#writing-memoized-selectors-with-reselect

Add new selectHaztrakSiteEpaIds redux selector
…is using the RCRAInfo site search services, into separate component. The badge also shows a warning when a user's organization admin has not set up their RCRAInfo API ID and Keys in RCRAInfo.
…ry for dot ID number selection. Also, the component fetched and pre-populate DOT ID numbers with options upon mounting
…, aimed at implementing material design's FAB
… various actions depending on the manifest state
Adjust ManifestForm test suite to accommodate multiple save buttons (one floating action button, one regular)
Minor changes to make HtSpinner for flexible and use correct profile selector in Profile Feature
@github-actions github-actions bot added client Related to front end workings (React/Redux) server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included labels Dec 11, 2023
@dpgraham4401 dpgraham4401 changed the title emanifest backend logic separation emanifest backend logic separation and Floating Acion Buttons Dec 11, 2023
@dpgraham4401 dpgraham4401 merged commit acfc60d into USEPA:main Dec 11, 2023
7 checks passed
@dpgraham4401 dpgraham4401 deleted the e-Manifest_class_service branch December 11, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Related to front end workings (React/Redux) server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant